package com.ruoyi.pcj.domain;

import com.mashuai.utils.toolkit.core.msHandlebean.annotation.MsDelCheck;
import com.mashuai.utils.toolkit.core.msHandlebean.annotation.MsJoinSubTable;
import com.ruoyi.common.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.pcj.constant.TbConstant;
import lombok.Data;
import com.ruoyi.common.core.domain.BaseEntity;

import java.util.List;

/**
 * 兴趣类型对象 pcj_hobby_type
 *
 * @author ms
 * @date 2024-02-03
 */
@Data
@TableName("pcj_hobby_type")
public class PcjHobbyType extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * @MsJoinSubTable注解，可带出子表信息
     */
    @MsDelCheck(checkTable = {"pcj_hobby@hobby_type_id"}, errorMsg = "删除数据中存在被兴趣或用户爱好进行引用，无法删除！")
    @MsJoinSubTable(joinTable = TbConstant.pcjHobby, joinField = "hobby_type_id", clazz = PcjHobby.class, setField = "hobbyList", condition = " del_flag = 0 order by seq_no  ")
    @TableField("id")
    private String id;


    /**
     * 删除标志（0代表存在 1代表删除）
     */
    @TableLogic
    @TableField("del_flag")
    private Integer delFlag;


    /** 创建人id */

    /** 更新人id */

    /**
     * 类型名称
     */
    @TableField("name")
    private String name;


    /**
     * 排序号
     */
    @TableField("seq_no")
    private Integer seqNo;

    /**
     * 兴趣爱好
     */
    @TableField(exist = false)
    private List<PcjHobby> hobbyList;

}
